package com.ts.admin.modules.content;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ts.common.core.utils.Result;
import com.ts.feign.api.TopicService;
import com.ts.feign.dto.TopicDTO;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 圈子
 *
 * @author admin admin@qq.com
 * @since 1.0.0 2023-02-22
 */
@RestController
@RequestMapping("/topic")
@Api(tags="圈子")
public class TopicController {
    @Autowired
    private TopicService topicService;

    @PostMapping("/page")
    public Result<Page> page(@RequestBody Page<TopicDTO> page){
        Page<TopicDTO> page1 = topicService.page(page);
        return new Result<Page>().ok(page1);
    }

}